<template>
  <div class="home-wrap global-wrap">
    <p class="global-title">- 操作成功</p>
    <div class="button-wrap">
      <van-button round type="info" @click="goLogin" class="mr-10">关闭</van-button>
      <van-button round type="info" @click="goPersonInfo" v-if="isSupplierAccount">继续提交</van-button>
    </div>
  </div>
</template>

<script>
import Cookies from 'js-cookie'
import { Field, Form, Button, Dialog, Toast, Row, Col } from "vant";

export default {
  name: "Success",
  components: {
    [Button.name]: Button,
  },
  data() {
    return {
      isSupplierAccount: null,
    };
  },

  activated() {
    this.isSupplierAccount = JSON.parse(localStorage.getItem('loginInfo')).isSupplierAccount;
  },

  methods: {
    goLogin() {
      this.$router.replace({path: 'login', query: {cid: this.$route.query.cid, tid: this.$route.query.tid}});
    },

    goPersonInfo() {
      this.$router.replace({path: 'personInfo', query: {cid: this.$route.query.cid, tid: this.$route.query.tid}});
    }
  },
};
</script>
<style lang='stylus' scoped>
.button-wrap
    display flex
    justify-content center
    margin 25px 0
    cursor pointer
    & >>> .van-button
      display inline-flex
      width auto
      height 42px
      padding 0
      background #0DC2FF
      box-shadow 0px 5px 5px 0px rgba(13, 194, 255, 0.35)
      border none
    & >>> .van-button__content
      display inline-flex
      padding 0 33px
</style>